home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…tion Library 2 (Reseller) / Apple R&P Lib Reseller v2.0.iso / 4-Fonts & Software / Demo Software / AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmpP_209_ModalOneShot.txt < prev    next >
Encoding:
Text File  |  1989-04-09  |  1.1 KB  |  76 lines

  1. # (decoded with TMPL 11972)
  2. { %filename% -- Modal one-shot dialog }
  3. { Created %date% %time% by AppMaker }
  4.  
  5. Unit %unitname%;
  6. Interface
  7.  
  8. Uses
  9. %if MPW%
  10.     {$Load ToolBox.dump}
  11.         MemTypes,
  12.         QuickDraw,
  13.         OSIntf,
  14.         ToolIntf,
  15.         PackIntf,
  16.     {$Load}
  17.  
  18. %end if%
  19. %If Think%
  20. {$ifc undefined Think_Pascal}
  21.     ListManager,
  22. {$endc}
  23. %end if%
  24.     ResourceDefs,
  25.     DialogAids;
  26.  
  27. Type
  28.     %dlogname%Rec = record
  29.         %DeclItems%
  30.     end;
  31.  
  32. {----------}
  33. Procedure Get%dlogname% (var %dlogname%:    %dlogname%Rec);
  34.  
  35. {----------}
  36. Implementation
  37.  
  38. %If MPW%
  39. {$D+}
  40. {$R+}
  41. {$OV+}
  42.  
  43. %end if%
  44. const
  45.     %ConstItems%
  46.  
  47. %If MPW%
  48. {$S %unitname%}
  49.  
  50. %end if%
  51. %ItemProcs%
  52. %MaybeFilter%
  53. {----------}
  54. Procedure Get%dlogname% {(var %dlogname%:    %dlogname%Rec)};
  55. var
  56.     theDialog:        DialogPtr;
  57.     itemNr:            integer;
  58. Begin
  59.     InitCursor;
  60.     theDialog := GetNewDialog (%dlogname%ID, nil, pointer (-1));
  61.     SetPort (theDialog);
  62.     With %dlogname% do begin
  63.         %SetItems%
  64.         ShowWindow (theDialog);
  65.         %EnableItems%
  66.         ModalDialog (%Filtername%, itemNr);
  67.         case itemNr of
  68.             %HandleItems%
  69.         end; {case}
  70.         %FinishItems%
  71.     end; {with}
  72.     DisposDialog (theDialog);
  73. End; {Get%dlogname%}
  74.  
  75. End. {%unitname%}
  76.